package com.qidian.mes.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.qidian.mes.excel.MachineryTypeEnableStatusConverter;

import java.util.Date;
import java.util.List;

/**
 * @Author 陆雯城
 * @Description
 * @Time 2024-04-10 23:32
 */
public class MachineryType {
    @ExcelProperty(value = "设备类型ID", index = 0)
    private Long machineryTypeId; // 设备类型ID - 主键
    @ExcelProperty(value = "设备类型编码", index = 1)
    private String machineryTypeCode; // 设备类型编码
    @ExcelProperty(value = "设备类型名称", index = 2)
    private String machineryTypeName; // 设备类型名称
    @ExcelProperty(value = "父类型ID", index = 3)
    private Long parentTypeId; // 父类型ID
    @ExcelProperty(value = "父类型名称", index = 4)
    private String parentTypeName;
    @ExcelProperty(value = "是否启用", index = 5, converter = MachineryTypeEnableStatusConverter.class)
    private Integer enableStatus; // 是否启用 - 1是, 2否, 99删除
    @ExcelProperty(value = "备注", index = 6)
    private String remark; // 备注
    @ExcelProperty(value = "创建时间", index = 7)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime; // 创建时间
    @ExcelProperty(value = "更新时间", index = 8)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date modifyTime; // 更新时间
    private List<MachineryType> children;
    private Boolean hasChildren; //  是否有子部门

    public MachineryType() {
    }

    public MachineryType(Long machineryTypeId, String machineryTypeCode, String machineryTypeName, Long parentTypeId, Integer enableStatus, String remark, Date createTime, Date modifyTime, List<MachineryType> children, Boolean hasChildren) {
        this.machineryTypeId = machineryTypeId;
        this.machineryTypeCode = machineryTypeCode;
        this.machineryTypeName = machineryTypeName;
        this.parentTypeId = parentTypeId;
        this.enableStatus = enableStatus;
        this.remark = remark;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
        this.children = children;
        this.hasChildren = hasChildren;
    }

    public String getParentTypeName() {
        return parentTypeName;
    }

    public void setParentTypeName(String parentTypeName) {
        this.parentTypeName = parentTypeName;
    }

    public Long getMachineryTypeId() {
        return machineryTypeId;
    }

    public void setMachineryTypeId(Long machineryTypeId) {
        this.machineryTypeId = machineryTypeId;
    }

    public String getMachineryTypeCode() {
        return machineryTypeCode;
    }

    public void setMachineryTypeCode(String machineryTypeCode) {
        this.machineryTypeCode = machineryTypeCode;
    }

    public String getMachineryTypeName() {
        return machineryTypeName;
    }

    public void setMachineryTypeName(String machineryTypeName) {
        this.machineryTypeName = machineryTypeName;
    }

    public Long getParentTypeId() {
        return parentTypeId;
    }

    public void setParentTypeId(Long parentTypeId) {
        this.parentTypeId = parentTypeId;
    }

    public Integer getEnableStatus() {
        return enableStatus;
    }

    public void setEnableStatus(Integer enableStatus) {
        this.enableStatus = enableStatus;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public List<MachineryType> getChildren() {
        return children;
    }

    public void setChildren(List<MachineryType> children) {
        this.children = children;
    }

    public Boolean getHasChildren() {
        return hasChildren;
    }

    public void setHasChildren(Boolean hasChildren) {
        this.hasChildren = hasChildren;
    }

    @Override
    public String toString() {
        return "MachineryType{" +
                "machineryTypeId=" + machineryTypeId +
                ", machineryTypeCode='" + machineryTypeCode + '\'' +
                ", machineryTypeName='" + machineryTypeName + '\'' +
                ", parentTypeId=" + parentTypeId +
                ", parentTypeName='" + parentTypeName + '\'' +
                ", enableStatus=" + enableStatus +
                ", remark='" + remark + '\'' +
                ", createTime=" + createTime +
                ", modifyTime=" + modifyTime +
                ", children=" + children +
                ", hasChildren=" + hasChildren +
                '}';
    }
}
